Skip to content

chore(framework): Remove the Bridge package and all its functionalities #6863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: vm-lang/chore/bridge-removal
Choose a base branch
from

Conversation

nonast
Copy link
Contributor

@nonast nonast commented May 14, 2025

Description of change

This PR completely removes a package from the iota-framework that was never enabled/used: the bridge.

Associated to that there was a whole set of tools to setup and run the bridge infra:

  • iota-bridge
  • iota-bridge-cli
  • iota-bridge-indexer
  • bridge directory for managing the EVM side
  1. So the first step was simply to delete these crates and the package from iota-framework.
  2. The second step was to remove the remaining dependencies on these. This means mostly tests and iota-types.
  3. The protocol flag bridge was removed (because it was never set to true), while the bridge_should_try_to_finalize_committee flag was left because it was previously set to Some (and removing this means we would modify previous protocol config digests, discussion)
  4. Two variants from the EndOfEpochTransactionKind were removed: BridgeStateCreate and BridgeCommitteeInit. Transactions of these kinds SHOULD NOT exist in Devnet, Testnet and Mainnet because the bridge protocol flag was never enabled. This has implications on all crates related to public APIs.
  5. EpochStartConfiguration was modified to remove bridge_obj_initial_shared_version and bridge_committee_initiated.
  6. Genesis changes:
    • given that genesis on the Testnet and Mainnet was run with a framework including the bridge, we need to support the replay of such process.
    • This means being able to run a genesis with protocol versions <= 8 with no issues (because the framework-snapshot of protocol versions <= 8 will forever include the bridge package snapshot).
    • No bridge objects were created during genesis, however the bridge package was verified before being published. In order to pass the verification, the 0xb::bridge::create function should be treated as privileged because it uses a UID parameter to create a new object (not a valid operation normally). So, this function is kept in the list of FUNCTIONS_TO_SKIP in the iota-verifier. This also means we SHOULD NOT reuse the 0xb address in the future or handle it carefully.
  7. iota-framework-snapshot changes:
    • some changes were required to enable the check_manifest_against_tomls test
    • this test checks that the name and id of each entry in manifest.json match the metadata in the Move.toml files of the iota-framework packages.
    • as suggested by the function comment that was there, this test now checks out the git revision of the package listed
      in the manifest and then use those files for the check. This allows us to modify name, id and remove packages every time we create a new protocol version.
      • it was necessary to use the long version of git revision in the manifest.json so that the fetch of commits during the check_manifest_against_tomls test execution would be more efficient (it fetches each commit instead of the whole history). Moreover, some revs in the manifest were pointing to commits not belonging to any branch (squashed), so these were manually updated.

TODO

  • update openapi?
  • update the sdk2 repo
  • update the TS types (should be just EndOfEpochTransactionKind)

Links to any relevant issues

fixes #6847

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How the change has been tested

CI.

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)

Infrastructure QA

TODO @iotaledger/infrastructure

  • Synchronization of the indexer from genesis for a network including migration objects.
  • Restart of indexer synchronization locally without resetting the database.
  • Restart of indexer synchronization on a production-like database.
  • Deployment of services using Docker.
  • Verification of API backward compatibility.

Release Notes

  • Protocol: Removed bridge flag (never enabled) and disabled bridge_should_try_to_finalize_committee flag. Now the bridge functionalities won't be present anymore. Removed the bridge framework package.
  • Nodes (Validators and Full nodes): Removed bridge_obj_initial_shared_version and bridge_committee_initiated from EpochStartConfiguration
  • Indexer:
  • JSON-RPC: Removed BridgeReadApi including getLatestBridge and getBridgeObjectInitialSharedVersion. Removed EndOfEpochTransactionKind::BridgeStateCreate and EndOfEpochTransactionKind::BridgeCommitteeInit variants.
  • GraphQL: Removed EndOfEpochTransactionKind::BridgeStateCreate and EndOfEpochTransactionKind::BridgeCommitteeInit variants and related types.
  • CLI: Removed bridge-committee-init, validator register-bridge-committee and update-bridge-committee-node-url commands.
  • Rust SDK: Removed EndOfEpochTransactionKind::BridgeStateCreate and EndOfEpochTransactionKind::BridgeCommitteeInit variants.
  • REST API:

Copy link

vercel bot commented May 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:40pm
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:40pm
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:40pm
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2025 5:40pm

@nonast nonast self-assigned this May 14, 2025
@github-actions github-actions bot added the ci Issues related to our CI pipeline label May 14, 2025
@iota-ci iota-ci added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels May 14, 2025
Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

@miker83z miker83z changed the base branch from develop to vm-lang/chore/bridge-removal May 30, 2025 13:19
@miker83z miker83z changed the title chore(framework): Remove the Bridge package and all its functionalities [DRAFT] chore(framework): Remove the Bridge package and all its functionalities May 30, 2025
@miker83z miker83z removed the request for review from luca-moser May 30, 2025 13:20
Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Copy link
Contributor

github-actions bot commented Jun 3, 2025

✅ Vercel Preview Deployment is ready!

View Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to our CI pipeline documentation Improvements or additions to documentation sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[framework] Remove the Bridge package and all its functionalities